package com.example.demo.Controller;

import com.example.demo.Enity.indexAll;
import com.example.demo.dao.IndexJpa;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

@RestController
@CrossOrigin(origins = "*", maxAge = 3600)
public class indexFind {
   @Autowired
  private IndexJpa indexJpa;

   @RequestMapping("/indexFind")
    public ArrayList<indexAll>  indexFind(String fen){
       ArrayList<indexAll> a=new ArrayList<>();
       a=indexJpa.find(fen);
       return a;
   }

}
